package com.ebelter.bodyfatscale.ui.pager.register;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import butterknife.ButterKnife;

/**
 * 注册页页面父类
 * Created by pan on 2017/3/4.
 */
public abstract class BasePager {

    public static final String TAG = "BasePager";

    public Context mContext;

    public View mRootView;// 布局对象

    protected LayoutInflater lf;


    public BasePager(Context context) {
        this.mContext = context;
        lf = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        mRootView = lf.inflate(loadLayoutById(), null);
        ButterKnife.bind(this,mRootView);
        initViews();
    }


    public Activity getActivity(){
        return (Activity) mContext;
    }



    protected int loadLayoutById() {
        return 0;
    }



    /**
     * 初始化布局
     */
    public abstract void initViews();

    //public abstract void initData(Object data);






}
